<?php


namespace app\common\validate;


use think\Validate;

class Plan extends Validate
{
    protected $rule=[
        'smoke_num|每日吸烟数量'=>'require|between:1,100',
        'cost|每日花费'=>'require|between:0.01,1000',
    ];
    protected $message=[
        'smoke_num.require'=>'请填写每日吸烟量',
        'smoke_num.between'=>'请填写正确每日吸烟数量',
        'cost.require'=>'请填写每日花费',
        'cost.between'=>'请填写正确每日花费',
    ];
    protected $scene=[
        'add_plan'=>['smoke_num','cost'],
    ];
}